<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>菜单管理</title>
    <link rel="shortcut icon" href="#"/>
    <script src="/besides/lib/layui/layui.all-all.js"></script>
    <script src="/besides/lib/jquery/jquery.min.js"></script>
    <script src="/besides/js/sys/menu-manage.js"></script>
    <script src="/besides/js/sys/content-page.js"></script>
    <script src="/besides/js/sys/requestUtil.js"></script>
<!--    <link href="/besides/css/menu-manage.css" rel="stylesheet">-->
    <link href="/besides/css/base.css" rel="stylesheet">
    <link href="/besides/lib/layui/css/layui.css" rel="stylesheet">
</head>
<body>
<div id="wrapper" class="pages-white-bg" style="padding-top: 5px;padding-left: 5px;padding-bottom: 5px;padding-right: 5px;">
    <div class="">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header layui-padding-10"
                         style="padding-top: 1px;padding-bottom: 1px; height: 40px;">
                        <button class="layui-btn layui-btn-normal layui-fl-right" id="addMenu">
                            <i class="layui-icon layui-icon-add-1"></i>新增菜单
                        </button>
                    </div>
                    <div class="layui-card-body"
                         style="padding-top: 5px;padding-bottom: 5px;padding-right: 5px;padding-left: 5px;">
                        <form action="" class="layui-form">
                            <div class="layui-row layui-col-space10">
                                <div class="layui-col-xs11 layui-col-sm12 layui-col-md11">
                                    <!--<div class="layui-col-xs3 layui-col-sm12 layui-col-md3">
                                        <div class="layui-input-inline">
                                            <input autocomplete="off" class="layui-input" id="queryTime" name="createTime"
                                                   onblur="this.placeholder='查询时间'" onfocus="this.placeholder=''"
                                                   placeholder="查询时间" type="text">
                                        </div>
                                    </div>-->
                                    <div class="layui-col-xs3 layui-col-sm12 layui-col-md3">
                                        <div class="layui-input-inline">
                                            <input autocomplete="off" class="layui-input" name="menuId" onblur="this.placeholder='菜单ID'"
                                                   onfocus="this.placeholder=''" placeholder="菜单ID"
                                                   type="text">
                                        </div>
                                    </div>
                                    <div class="layui-col-xs3 layui-col-sm12 layui-col-md3">
                                        <div class="layui-input-inline">
                                            <input autocomplete="off" class="layui-input" name="menuName" onblur="this.placeholder='菜单名称'"
                                                   onfocus="this.placeholder=''" placeholder="菜单名称"
                                                   type="text">
                                        </div>
                                    </div>
                                    <div class="layui-col-xs3 layui-col-sm12 layui-col-md3">
                                        <div class="layui-input-inline">
                                            <select name="parentId">
                                                <option value="" selected="">父级菜单名称</option>
                                                <option value="P001">系统设置</option>
                                                <option value="P002">私人订制</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-col-xs1 layui-col-sm12 layui-col-md1">
                                    <button class="layui-btn" lay-filter="btnQuery" lay-submit="">查询</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <table class="layui-hide" id="test" lay-filter="test"></table>
        <script id="barDemo" type="text/html">
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        </script>
        <script>
            //展示列表创建时间字段类型转换
            Date.prototype.Format = function (fmt) { //author: meizz
                var o = {
                    "M+": this.getMonth() + 1,                 //月份
                    "d+": this.getDate(),                    //日
                    "h+": this.getHours(),                   //小时
                    "m+": this.getMinutes(),                 //分
                    "s+": this.getSeconds(),                 //秒
                    "q+": Math.floor((this.getMonth() + 3) / 3), //季度
                    "S": this.getMilliseconds()             //毫秒
                };
                if (/(y+)/.test(fmt))
                    fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
                for (var k in o)
                    if (new RegExp("(" + k + ")").test(fmt))
                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                return fmt;
            }
        </script>
        <script id="CREATE_TIME" type="text/html">
            {{#
            var date = new Date();
            date.setTime(d.CREATE_TIME);
            return date.Format("yyyy-MM-dd hh:mm:ss");
            }}
        </script>
    </div>
    <p class="layui-color-red add-beizhu">
        <span style="color:red">
        *注：此操作页面为"菜单管理配置"页面，~欢迎您的使用！
        </span>
    </p>
</div>
<!--新增页面-->
<script id="addMenuConfig" type="text/html">
    <div class="">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body am-padding-0">
                        <form class="layui-form " action="">
                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
                                <legend>菜单信息配置</legend>
                            </fieldset>
                            <div class="layui-form-item ">
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuName" lay-verify="required|menuName"
                                               autocomplete="off"
                                               onfocus="this.placeholder=''" onblur="this.placeholder='菜单名称'"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单排序</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuSort" lay-verify="required|menuSort"
                                               autocomplete="off"
                                               onfocus="this.placeholder=''" onblur="this.placeholder='菜单排序'"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 100px;">
                                <legend>基本信息配置</legend>
                            </fieldset>
                            <div class="layui-form-item ">
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>父级菜单名称</label>
                                    <div class="layui-input-inline">
                                        <select name="parentId" lay-verify="required">
                                            <option value="" selected="">父级菜单名称</option>
                                            <option value="P001">系统设置</option>
                                            <option value="P002">私人订制</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单Action名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuAction" lay-verify="required|menuPageAction"
                                               autocomplete="off"
                                               onfocus="this.placeholder=''" onblur="this.placeholder='菜单Action名称'"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item layui-row layui-padding-10">
                                <button class="layui-btn layui-btn-normal layui-fl-right" lay-submit=""
                                        lay-filter="btnSaveMenu"><i class="fa fa-floppy-o"></i>&nbsp;&nbsp;保存
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<!--编辑页面-->
<script id="editMenuConfig" type="text/html">
    <div class="">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <form id="editList" class="layui-form " action="" lay-filter="menuEdit">
                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                                <legend>菜单信息配置</legend>
                            </fieldset>
                            <div class="layui-form-item ">
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单ID </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuId" lay-verify="required|menuId" autocomplete="off"
                                               value="{{d.menuId}}" onfocus="this.placeholder=''"
                                               onblur="this.placeholder='菜单ID'"
                                               class="layui-input" disabled="disabled">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item ">
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单名称 </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuName" lay-verify="required|menuName"
                                               autocomplete="off"
                                               value="{{d.menuName}}" onfocus="this.placeholder=''"
                                               onblur="this.placeholder='菜单名称'"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单排序</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuSort" lay-verify="required|menuSort"
                                               autocomplete="off"
                                               onfocus="this.placeholder=''" value="{{d.menuSort}}"
                                               onblur="this.placeholder='菜单排序'"
                                               class="layui-input" disabled="disabled">
                                    </div>
                                </div>
                            </div>
                            <fieldset class="layui-elem-field layui-field-title">
                                <legend>基本信息配置</legend>
                            </fieldset>
                            <div class="layui-form-item ">
                                <div class="layui-inline">
                                    <label class="layui-form-label"><span style="color:red">*</span>菜单Action名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="menuAction" lay-verify="required|menuPageAction"
                                               autocomplete="off"
                                               onfocus="this.placeholder=''" value="{{d.menuAction}}"
                                               onblur="this.placeholder='菜单Action名称'"
                                               class="layui-input" disabled="disabled">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item layui-row layui-padding-10">
                                <button class="layui-btn layui-btn-normal layui-fl-right" lay-submit=""
                                        lay-filter="btnEditMenu"><i class="fa fa-floppy-o"></i>&nbsp;&nbsp;修改
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script src="/besides/js/sys/menu-manage.js"></script>
</body>
</html>